home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-07-06 | 7.7 KB | 245 lines | [TEXT/MPS ] |
- {
- File: GXEnvironment.p
-
- Contains: QuickDraw GX environment constants and interfaces
-
- Version: Technology: Quickdraw GX 1.1
- Package: Universal Interfaces 2.1 in “MPW Latest” on ETO #18
-
- Copyright: © 1984-1995 by Apple Computer, Inc.
- All rights reserved.
-
- Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- stack. Include the file and version information (from above)
- in the problem description and send to:
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- }
-
- {$IFC UNDEFINED UsingIncludes}
- {$SETC UsingIncludes := 0}
- {$ENDC}
-
- {$IFC NOT UsingIncludes}
- UNIT GXEnvironment;
- INTERFACE
- {$ENDC}
-
- {$IFC UNDEFINED __GXENVIRONMENT__}
- {$SETC __GXENVIRONMENT__ := 1}
-
- {$I+}
- {$SETC GXEnvironmentIncludes := UsingIncludes}
- {$SETC UsingIncludes := 1}
-
-
- {$IFC UNDEFINED __CONDITIONALMACROS__}
- {$I ConditionalMacros.p}
- {$ENDC}
-
- {$IFC UNDEFINED __MIXEDMODE__}
- {$I MixedMode.p}
- {$ENDC}
- { Types.p }
-
- {$IFC UNDEFINED __WINDOWS__}
- {$I Windows.p}
- {$ENDC}
- { Memory.p }
- { Quickdraw.p }
- { QuickdrawText.p }
- { Events.p }
- { OSUtils.p }
- { Controls.p }
- { Menus.p }
-
- {$IFC UNDEFINED __GXTYPES__}
- {$I GXTypes.p}
- {$ENDC}
- { GXMath.p }
- { FixMath.p }
-
- {$IFC UNDEFINED __CMAPPLICATION__}
- {$I CMApplication.p}
- {$ENDC}
- { Files.p }
- { Finder.p }
- { Printing.p }
- { Errors.p }
- { Dialogs.p }
- { TextEdit.p }
- { CMICCProfile.p }
-
- {$PUSH}
- {$ALIGN MAC68K}
- {$LibExport+}
- {$SETC graphicsMacintoshIncludes := 1}
-
- CONST
- defaultPollingHandlerFlags = $00;
- okToSwitchDuringPollFlag = $00;
- dontSwitchDuringPollFlag = $01;
-
-
- TYPE
- gxPollingHandlerFlags = LONGINT;
-
- gxPollingHandlerProcPtr = ProcPtr; { PROCEDURE gxPollingHandler(reference: LONGINT; flags: gxPollingHandlerFlags); }
- gxPollingHandlerUPP = UniversalProcPtr;
-
- CONST
- uppgxPollingHandlerProcInfo = $000003C1; { PROCEDURE (4 byte param, 4 byte param); }
-
- FUNCTION NewgxPollingHandlerProc(userRoutine: gxPollingHandlerProcPtr): gxPollingHandlerUPP;
- {$IFC NOT GENERATINGCFM }
- INLINE $2E9F;
- {$ENDC}
-
- PROCEDURE CallgxPollingHandlerProc(reference: LONGINT; flags: gxPollingHandlerFlags; userRoutine: gxPollingHandlerUPP);
- {$IFC NOT GENERATINGCFM}
- INLINE $205F, $4E90;
- {$ENDC}
-
- FUNCTION GXGetGraphicsPollingHandler(VAR reference: LONGINT): gxPollingHandlerUPP; C;
- PROCEDURE GXSetGraphicsPollingHandler(handler: gxPollingHandlerUPP; reference: LONGINT); C;
- {$SETC graphicsToolboxIncludes := 1}
- { QD to QD GX Translator typedefs }
-
- CONST
- gxDefaultOptionsTranslation = $0000;
- gxOptimizedTranslation = $0001;
- gxReplaceLineWidthTranslation = $0002;
- gxSimpleScalingTranslation = $0004;
- gxSimpleGeometryTranslation = $0008; { implies simple scaling }
- gxSimpleLinesTranslation = $000C; { implies simple geometry & scaling }
- gxLayoutTextTranslation = $0010; { turn on gxLine layout (normally off) }
- gxRasterTargetTranslation = $0020;
- gxPostScriptTargetTranslation = $0040;
- gxVectorTargetTranslation = $0080;
-
-
- TYPE
- gxTranslationOption = LONGINT;
-
-
- CONST
- gxContainsFormsBegin = $0001;
- gxContainsFormsEnd = $0002;
- gxContainsPostScript = $0004;
- gxContainsEmptyPostScript = $0008;
-
-
- TYPE
- gxTranslationStatistic = LONGINT;
-
-
- CONST
- gxQuickDrawPictTag = 'pict';
-
-
- TYPE
- gxQuickDrawPict = RECORD
- { translator inputs }
- options: gxTranslationOption;
- srcRect: Rect;
- styleStretch: Point;
- { size of quickdraw picture data }
- dataLength: LONGINT;
- { file alias }
- alias: gxBitmapDataSourceAlias;
- END;
-
- { WindowRecord utilities }
-
- FUNCTION GXNewWindowViewPort(qdWindow: WindowPtr): gxViewPort; C;
- FUNCTION GXGetWindowViewPort(qdWindow: WindowPtr): gxViewPort; C;
- FUNCTION GXGetViewPortWindow(portOrder: gxViewPort): WindowPtr; C;
- { GDevice utilities }
- FUNCTION GXGetViewDeviceGDevice(theDevice: gxViewDevice): GDHandle; C;
- FUNCTION GXGetGDeviceViewDevice(qdGDevice: GDHandle): gxViewDevice; C;
- { gxPoint utilities }
- PROCEDURE GXConvertQDPoint({CONST}VAR shortPt: Point; portOrder: gxViewPort; VAR fixedPt: gxPoint); C;
- { printing utilities typedef }
- TYPE
- gxShapeSpoolProcPtr = ProcPtr; { FUNCTION gxShapeSpool(toSpool: gxShape; refCon: LONGINT): OSErr; }
- gxUserViewPortFilterProcPtr = ProcPtr; { PROCEDURE gxUserViewPortFilter(toFilter: gxShape; portOrder: gxViewPort; refCon: LONGINT); }
- gxConvertQDFontProcPtr = ProcPtr; { FUNCTION gxConvertQDFont(dst: gxStyle; txFont: LONGINT; txFace: LONGINT): LONGINT; }
- gxShapeSpoolUPP = UniversalProcPtr;
- gxUserViewPortFilterUPP = UniversalProcPtr;
- gxConvertQDFontUPP = UniversalProcPtr;
-
- CONST
- uppgxShapeSpoolProcInfo = $000003E1; { FUNCTION (4 byte param, 4 byte param): 2 byte result; }
- uppgxUserViewPortFilterProcInfo = $00000FC1; { PROCEDURE (4 byte param, 4 byte param, 4 byte param); }
- uppgxConvertQDFontProcInfo = $00000FF1; { FUNCTION (4 byte param, 4 byte param, 4 byte param): 4 byte result; }
-
- FUNCTION NewgxShapeSpoolProc(userRoutine: gxShapeSpoolProcPtr): gxShapeSpoolUPP;
- {$IFC NOT GENERATINGCFM }
- INLINE $2E9F;
- {$ENDC}
-
- FUNCTION NewgxUserViewPortFilterProc(userRoutine: gxUserViewPortFilterProcPtr): gxUserViewPortFilterUPP;
- {$IFC NOT GENERATINGCFM }
- INLINE $2E9F;
- {$ENDC}
-
- FUNCTION NewgxConvertQDFontProc(userRoutine: gxConvertQDFontProcPtr): gxConvertQDFontUPP;
- {$IFC NOT GENERATINGCFM }
- INLINE $2E9F;
- {$ENDC}
-
- FUNCTION CallgxShapeSpoolProc(toSpool: gxShape; refCon: LONGINT; userRoutine: gxShapeSpoolUPP): OSErr;
- {$IFC NOT GENERATINGCFM}
- INLINE $205F, $4E90;
- {$ENDC}
-
- PROCEDURE CallgxUserViewPortFilterProc(toFilter: gxShape; portOrder: gxViewPort; refCon: LONGINT; userRoutine: gxUserViewPortFilterUPP);
- {$IFC NOT GENERATINGCFM}
- INLINE $205F, $4E90;
- {$ENDC}
-
- FUNCTION CallgxConvertQDFontProc(dst: gxStyle; txFont: LONGINT; txFace: LONGINT; userRoutine: gxConvertQDFontUPP): LONGINT;
- {$IFC NOT GENERATINGCFM}
- INLINE $205F, $4E90;
- {$ENDC}
-
- TYPE
- gxShapeSpoolFunction = gxShapeSpoolUPP;
-
- gxUserViewPortFilter = gxUserViewPortFilterUPP;
-
- gxConvertQDFontFunction = gxConvertQDFontUPP;
-
- { mouse utilities }
- { return mouse location in fixed-gxPoint global space }
-
- PROCEDURE GXGetGlobalMouse(VAR globalPt: gxPoint); C;
- { return fixed-gxPoint local mouse (gxViewPort == 0 --> default) }
- PROCEDURE GXGetViewPortMouse(portOrder: gxViewPort; VAR localPt: gxPoint); C;
- { printing utilities }
- FUNCTION GXGetViewPortFilter(portOrder: gxViewPort; VAR refCon: LONGINT): gxUserViewPortFilter; C;
- PROCEDURE GXSetViewPortFilter(portOrder: gxViewPort; filter: gxUserViewPortFilter; refCon: LONGINT); C;
- { QD to QD GX Translator functions }
- PROCEDURE GXInstallQDTranslator(port: GrafPtr; options: gxTranslationOption; {CONST}VAR srcRect: Rect; {CONST}VAR dstRect: Rect; styleStrech: Point; userFunction: gxShapeSpoolUPP; reference: UNIV Ptr); C;
- FUNCTION GXRemoveQDTranslator(port: GrafPtr; VAR statistic: gxTranslationStatistic): gxTranslationStatistic; C;
- FUNCTION GXConvertPICTToShape(pict: PicHandle; options: gxTranslationOption; {CONST}VAR srcRect: Rect; {CONST}VAR dstRect: Rect; styleStretch: Point; destination: gxShape; VAR stats: gxTranslationStatistic): gxShape; C;
- { Find the best GX style given a QD font and face. Called by the QD->GX translator }
- FUNCTION GXConvertQDFont(theStyle: gxStyle; txFont: LONGINT; txFace: LONGINT): LONGINT; C;
- FUNCTION GXGetConvertQDFont: gxConvertQDFontUPP; C;
- PROCEDURE GXSetConvertQDFont(userFunction: gxConvertQDFontUPP); C;
- { ColorSync 2.0 interface related routines }
- PROCEDURE GXSetColorProfileReference(profile: gxColorProfile; reference: CMProfileRef); C;
- FUNCTION GXGetColorProfileReference(profile: gxColorProfile): CMProfileRef; C;
-
- {$ALIGN RESET}
- {$POP}
-
- {$SETC UsingIncludes := GXEnvironmentIncludes}
-
- {$ENDC} {__GXENVIRONMENT__}
-
- {$IFC NOT UsingIncludes}
- END.
- {$ENDC}
-